import redis

class BaseConfig():
    WECHAT_APPID = 'wx85e08157af274594'
    WECHAT_APP_SECRET ='c7d66ed871f2d5f6a753ed10c1909b6e'
    WECHAT_LOGIN_URL = "https://api.weixin.qq.com/sns/jscode2session?appid="+ WECHAT_APPID +"&secret="+ WECHAT_APP_SECRET +"&js_code={0}&grant_type=authorization_code"

    SECRET_KEY = 'sdsdsdsd'
    SESSION_USE_SIGNER = True

    SESSION_TYPE = 'redis'
    SESSION_KEY_PREFIX = 'session:'
    PERMANENT_SESSION_LIFETIME = 72000
    # SESSION_REDIS = redis.Redis(host='127.0.0.1', port='6379', db=4)

    TOKEN_TIMEOUT_VALUE = 7201
    TOKEN_SALT = 'sdfs354753hfkkfmsdfmsfmslkdfjl'

    SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:123456@127.0.0.1:3306/db_hezhong?charset=utf8'
    SQLALCHEMY_POOL_SIZE = 5
    SQLALCHEMY_POOL_TIMEOUT = 15
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    APP_DEFAULT_PAGE_SIZE = 15

class HZConfig(BaseConfig):
    pass


current_config = HZConfig()
